home *** CD-ROM | disk | FTP | other *** search
- class PopUp extends State
- {
- var sState;
- static var sSTATE_IDLE = "Idle";
- static var sSTATE_OPENING = "Opening";
- static var sSTATE_OPENED = "Opened";
- static var sSTATE_CLOSING = "Closing";
- function PopUp(_mcRef)
- {
- super(_mcRef,false);
- this.setState(PopUp.sSTATE_IDLE);
- }
- function doShow()
- {
- if(this.sState == PopUp.sSTATE_IDLE)
- {
- this.setState(PopUp.sSTATE_OPENING);
- }
- }
- function doInstantShow()
- {
- if(this.sState == PopUp.sSTATE_IDLE)
- {
- this.setState(PopUp.sSTATE_OPENED);
- this.initPopUp();
- }
- }
- function doHide()
- {
- if(this.sState == PopUp.sSTATE_OPENED)
- {
- this.setState(PopUp.sSTATE_CLOSING);
- }
- }
- function doInstantHide()
- {
- if(this.sState == PopUp.sSTATE_OPENED)
- {
- this.setState(PopUp.sSTATE_IDLE);
- }
- }
- function initPopUp()
- {
- }
- function Idle()
- {
- }
- function Opening()
- {
- if(this.stateFinished())
- {
- this.setState(PopUp.sSTATE_OPENED);
- this.initPopUp();
- }
- }
- function Opened()
- {
- }
- function Closing()
- {
- if(this.stateFinished())
- {
- this.setState(PopUp.sSTATE_IDLE);
- }
- }
- }
-